using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication11.Models.Mapping
{
    public class giftMap : EntityTypeConfiguration<gift>
    {
        public giftMap()
        {
            // Primary Key
            this.HasKey(t => t.gift_id);

            // Properties
            this.Property(t => t.gift_name)
                .HasMaxLength(32);

            this.Property(t => t.gift_desc)
                .HasMaxLength(200);

            // Table & Column Mappings
            this.ToTable("gift");
            this.Property(t => t.gift_id).HasColumnName("gift_id");
            this.Property(t => t.gift_name).HasColumnName("gift_name");
            this.Property(t => t.gift_incentive).HasColumnName("gift_incentive");
            this.Property(t => t.gift_amount).HasColumnName("gift_amount");
            this.Property(t => t.gift_desc).HasColumnName("gift_desc");
            this.Property(t => t.gift_available_amount).HasColumnName("gift_available_amount");
            this.Property(t => t.gift_lock_amount).HasColumnName("gift_lock_amount");
        }
    }
}
